<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>找回密码</title>
<link href="/static/Wopop_files/style_log.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="/static/Wopop_files/style.css">
<link rel="stylesheet" type="text/css" href="/static/Wopop_files/userpanel.css">
<script src='/static/Wopop_files/jquery-1.8.3.min.js'></script>

</head>

<body class="login" mycollectionplug="bind">
    <div class="login_m">
        <div class="login_logo"></div>
        <div class="login_boder">

            <div class="login_padding" id="login_model">

                <h2>找回密码</h2>
                <form action="/admin/Userlr/reset" method="post">
                    <label>
                        <input maxlength='11' type="text" id="username" name="num" class="txt_input txt_input2" onfocus="if (value ==&#39;Your name&#39;){value =&#39;&#39;}" onblur="if (value ==&#39;&#39;){value=&#39;&#39;}"  placeholder="输入手机" value="">
                    </label>
                    <div id='div' style="color:red"></div>
                    <h2>验证码</h2>
                    <label>
                        <input type="text" maxlength='4'  id="userpwd" name="yzm" class="txt_input" onfocus="if (value ==&#39;******&#39;){value =&#39;&#39;}" onblur="if (value ==&#39;&#39;){value=&#39;&#39;}" value="" placeholder="输入验证码">
                    </label>
                    <label>
                       <input type="button" id="btn" value="免费获取验证码" onclick="settime(this)" /> 
                    </label>
                    <script>
                    $('#username').blur(function(){
                    var tel=$('#username').val();
                    $.ajax({
                        type: 'get',
                        url: "{:url('admin/Userlr/tel')}",
                        data: 'tel='+tel,
                        dataType:'json',
                        success: function(data){
                        if (data=='用户不存在') {
                            $('#div').html(data);
                        }
                       
                       


                            }
                       })     
                                       
                    }) 

                    $('#btn').click(function(){
                           var tel=$('#username').val();
                    $.ajax({
                        type: 'get',
                        url: "{:url('admin/Userlr/yzm')}",
                        data: 'tel='+tel,
                        dataType:'json',
                        success: function(data){
                      
                        console.log(data);
                       


                        }
                   })     
                                   
                }) 

                

               </script>
                   
                   
                <div class="rem_sub">
                   
                    <label>
                        <input type="submit" class="sub_button" name="button" id="but" value="确定" style="opacity: 0.7;">
                    </label>
                </div>
                </form>
                <div id="forget_model" class="login_padding" style="display:none"><br>
                    <h1>Forgot password</h1><br>
                    <div class="forget_model_h2">(Please enter your registered email below and the system will automatically reset users’ password and send it to user’s registered email address.)
                    </div>
                    <label>
                        <input type="text" id="usrmail" class="txt_input txt_input2">
                    </label>
                    <div class="rem_sub">
                        <div class="rem_sub_l"></div>
                        <label>
                            <input type="submit" class="sub_buttons" name="button" id="Retrievenow" value="Retrieve now" style="opacity: 0.7;">　　　
                            <input type="submit" class="sub_button" name="button" id="denglou" value="Return" style="opacity: 0.7;">　　
                        </label>
                    </div>
                    
                </div>
            </div><!--login_padding  Sign up end-->
        </div><!--login_boder end-->
    </div><!--login_m end-->
</body>

</html>
<!DOCTYPE html>
<html>
<head>

<script type="text/javascript"> 

   var countdown=60; 
                    function settime(obj) { 
                        if (countdown == 0) { 
                            obj.removeAttribute("disabled");    
                            obj.value="免费获取验证码"; 
                            countdown = 60; 
                            return;
                        } else { 
                            obj.setAttribute("disabled", true); 
                            obj.value="重新发送(" + countdown + ")"; 
                            countdown--; 
                        } 
                    setTimeout(function() { 
                        settime(obj) }
                        ,1000) 
                    }
</script>


